package com.huang.weic.controller;

import com.huang.weic.bean.User;
import com.huang.weic.service.UserService;
import com.huang.weic.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;


    @PostMapping("/add")
    public R addUser(@RequestBody User user){
        userService.addUser(user);
        return R.ok().message("登录成功"+user);
    }

}
